/*
 * Queue.cpp
 *
 *  Created on: Sep 24, 2014
 *      Author: hung
 */

#include "Queue.h"
#include<iostream>

namespace std {

Queue::Queue() {

}

int Queue::size(){
	return list.size();
}
void Queue::enqueue(int data){
	list.addLast(data);
}

bool Queue::dequeue(int &data){
	if(list.empty())
		return false;
	else{
		data = list.removeFirst();
		return true;
	}
}

bool Queue::front(int &data){
	if(list.empty())
		return false;
	else{
		data = list.getHead()->data;
		return true;
	}
}

void Queue::display(){
	list.display();
}
Queue::~Queue() {
	// TODO Auto-generated destructor stub
}

} /* namespace std */
